﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kardex_Entity;

namespace Kardex_DataAccess
{
   public class CentroDistribuidorDA
    {
        bd_kardexEntities context;
        public CentroDistribuidorDA()
       {
           context = new bd_kardexEntities();
       }
        #region CentroDistribuidor
        /// <summary>
        /// GetListCD
        /// </summary>
        /// <returns>List All obj CD</returns>
        public List<centrodistribucion> GetListCD()
        {
            List<centrodistribucion> ListCD = null;
            try
            {
                var q = from c in context.centrodistribucion
                        orderby c.NameCD
                        select c;
                ListCD = q.ToList();
                return ListCD;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message.ToString());
            }
        }
        #endregion
    }
}
